﻿
using MassTransit;
using Microsoft.EntityFrameworkCore;
using Orders.Application.Data.Entities;


namespace Orders.Application.Data
{
    public class OrdersDbContext:DbContext
    {
        public DbSet<Order> orders { get; set; } = null!;
        public OrdersDbContext(DbContextOptions<OrdersDbContext> options)
            :base(options)
        {
            
        }

        protected override void OnModelCreating(ModelBuilder modelBuilder)
        {
            base.OnModelCreating(modelBuilder);

            
            modelBuilder.AddInboxStateEntity();
            modelBuilder.AddOutboxStateEntity();
            modelBuilder.AddOutboxMessageEntity();
        }
    }
}
